import request from '@/utils/request';

//创建事故案例
export function createAccident(data) {
    return request({
        url: `/accident_case/`,
        method: 'post',
        data: data
    })
}
// 上传附件
export function UploadFile(data) {
    return request({
        url: '/accessory/',
        method: 'post',
        data: data
    })
}
// 查询附件
export function queryFile(data) {
    return request({
        url: '/accessory/',
        method: 'get',
        data: data
    })
}
//查询事故案例
export function queryAccident() {
    return request({
        url: '/accident_case/',
        method: 'get',
    })
}

//修改事故案例
export function updateAccident(data) {
    return request({
        url: `/accident_case/${data.id}/`,
        method: 'put',
        data: data
    })
}

//删除事故案例
export function delAccident(id) {
    return request({
        url: `/accident_case/${id}`,
        method: 'delete',
    })
}
